Friday, February 17, 2023

Oracle Linux virt-manager Error launching create dialog: list index out of range

After a fresh install of Oracle Linux 9.1 and installing virt-manager/virt-install, I tried to create a new virtual machine and got this error: 


virt-install also gave an error:



Turns out it was a problem with osinfo, as this command threw an error too:


To fix it I had to edit /usr/share/osinfo/os/oracle.com/ol-9.xml

and replace this line:



with this:




After that virt-install and virt-manager were able to create VMs.


Friday, October 24, 2008

Add an HP-UX item to the boot options list from the EFI Shell.

Adding an HP-UX Boot Option

This procedure adds an HP-UX item to the boot options list from the EFI Shell.

To add an HP-UX boot option when logged in to HP-UX, use the setboot command. For details refer to the setboot(1M) manpage.

  1. Access the EFI Shell environment.

    Log in to the iLO MP and enter CO to access the server console.

    When accessing the console, confirm that you are at the EFI Boot Manager menu (the main EFI menu). If you are at another EFI menu, choose the Exit option from the submenus until you return to the screen with the EFI Boot Manager heading.

    From the EFI Boot Manager menu, choose the EFI Shell menu option to access the EFI Shell environment.

  2. Access the EFI System Partition (fsX: where X is the file system number) for the device from which you want to boot HP-UX.

    For example, enter fs2: to access the EFI System Partition for the bootable file system number 2. The EFI Shell prompt changes to reflect the file system currently accessed.

    The full path for the HP-UX loader is \EFI\HPUX\HPUX.EFI and it should be on the device you are accessing.

  3. At the EFI Shell environment, use the bcfg command to manage the boot options list.

    The bcfg command includes the following options for managing the boot options list:

    • bcfg boot dump — Display all items in the boot options list for the server.

    • bcfg boot rm # — Remove the item number specified by # from the boot options list.

    • bcfg boot mv #a #b — Move the item number specified by #a to the position specified by #b in the boot options list.

    • bcfg boot add # file.efi "Description" — Add a new boot option to the position in the boot options list specified by #. The new boot option references file.efi and is listed with the title specified by Description.

      For example, bcfg boot add 1 \EFI\HPUX\HPUX.EFI "HP-UX 11i" adds an HP-UX 11i item as the first entry in the boot options list.

    Refer to the help bcfg command for details.

  4. Exit the console and iLO MP interfaces if you are finished using them.

    Press Ctrl+B to exit the system console and return to the iLO MP Main Menu. To exit the iLO MP, type X at the Main Menu.

Wednesday, October 01, 2008

Sun SVM script to simplify the metastat output

#!/usr/bin/ksh
#
# 'nawk' script to parse 'metastat' output and present
# in a useful output.
#
# Example:
# # metainfo
# Device Size MB Mirror0 State0 Device0 Mirror1 State1 Device1
# d60: 10240,6 d61 Okay c1t0d0s6 d62 Okay c1t1d0s6
# d40: 4099,22 d41 Okay c1t0d0s4 d42 Okay c1t1d0s4
# d30: 2052,09 d31 Okay c1t0d0s3 d32 Okay c1t1d0s3
# d20: 2052,09 d21 Okay c1t0d0s1 d22 Okay c1t1d0s1
# d10: 3075,66 d11 Okay c1t0d0s0 d12 Okay c1t1d0s0
# d50: 2052,09 d51 Okay c1t0d0s5 d52 Okay c1t1d0s5
#
# Submitted by: Adrian Meier
#

metastat | nawk '
BEGIN { print "Device Size MB Mirror0 State0 Device0 Mirror1 State1 Device1"
OFS=" "}
/Mirror/ { if (dev != "") print dev, size, mir0, stat0, dev0, mir1, stat1, dev1
dev=$1; size=""; mir0=""; stat0=""; dev0="" }
/Size:/ { if (size == "") size=$2/2048 }
/Submirror 0/ { mir0=$3 }
/Submirror 1/ { mir1=$3 }
/State:/ { if (stat0 == "") stat0=$2; else stat1=$2 }
/c.t.d.s./ { if (dev0 == "") dev0=$1; else dev1=$1 }
END { print dev, size, mir0, stat0, dev0, mir1, stat1, dev1 }'

# Exit
exit 0

##############################################################################
### This script is submitted to BigAdmin by a user of the BigAdmin community.
### Sun Microsystems, Inc. is not responsible for the
### contents or the code enclosed.
###
###
### Copyright 2008 Sun Microsystems, Inc. ALL RIGHTS RESERVED
### Use of this software is authorized pursuant to the
### terms of the license found at
### http://www.sun.com/bigadmin/common/berkeley_license.html
##############################################################################


Friday, July 25, 2008

SVM (formerly disksuite)

#
/usr/sbin/metainit d101 1 1 c1t2d0s2
#
/usr/sbin/metainit d102 1 1 c1t3d0s2
#
/usr/sbin/metainit d100 -m d101
/usr/sbin/metattach d100 d102
#
metainit d110 -p d100 10g
metainit d111 -p d100 5g
metainit d112 -p d100 20g
metainit d113 -p d100 2g

Wednesday, July 23, 2008

Solaris Containers Quick Ref

# Solaris Zone Setup
# create the softpartitions:
metainit d211 -p d200 5g
metainit d212 -p d200 20g
metainit d213 -p d200 2g
zonecfg -z boxcar -f boxcar_zone.cfg
zoneadm -z boxcar verify
zoneadm -z boxcar install -p -a /var/tmp/falls-z1.flar
zoneadm -z boxcar boot

zoneadm list -v
zlogin -C boxcar
# ~. to exit console

#Contents of cfg file:
create -t SUNWsolaris8
set zonepath = /sol8/boxcar
add net
set address = 172.25.78.114
set physical = e1000g0
end
add dedicated-cpu
set ncpus=2-4
set importance=10
end
add capped-memory
set physical=8192m
end
add fs
set dir=/var
set special=/dev/md/dsk/d211
set raw=/dev/md/rdsk/d211
set type=ufs
end
add fs
set dir=/opt
set special=/dev/md/dsk/d212
set raw=/dev/md/rdsk/d212
set type=ufs
end
add fs
set dir=/oracle
set special=/dev/md/dsk/d213
set raw=/dev/md/rdsk/d213
set type=ufs
end
verify
commit
exit

Monday, July 14, 2008

Using Amazon S3 as storage for a web site

I used "s3cmd" under ubuntu to create a new bucket, then upload a jpeg to it:

Configure s3cmd to use your Amazon S3 account:
s3cmd --configure
Make a new bucket:<bucket>
s3cmd mb s3://
Upload a jpeg to the bucket:
s3cmd -P --mime-type=image/jpeg put picture.jpg s3://<bucket>
The URL for the file:
http://<bucket>.s3.amazonaws.com/picture.jpg

Oracle Linux virt-manager Error launching create dialog: list index out of range

After a fresh install of Oracle Linux 9.1 and installing virt-manager/virt-install, I tried to create a new virtual machine and got this err...